import request from '@/utils/request';

//列表查询
export function list(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/management/excel/batch/getBatchTable',
		method: 'post',
		data: data,
	});
}

// 下载导入模板
export function getTemplate(): ApiPromise<ApiResponse> {
	return request({
		url: '/management/excel/batch/download',
		method: 'get',
		responseType: 'blob',
	});
}

// 导入Excel
export function upload(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/management/excel/batch/upload',
		method: 'post',
		data: data,
	});
}

// 列表导出Excel
export function download4List(dataNumber: any): ApiPromise<ApiResponse> {
	return request({
		url: '/management/excel/batch/download/' + dataNumber,
		method: 'get',
		responseType: 'blob',
	});
}

// 导入业务结果列表
export function getList(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/management/excel/batch/getBusinessTable',
		method: 'post',
		data: data,
	});
}

// 跳转后 导入步骤结果列表
export function getStepLsit(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/management/excel/batch/getStepTable',
		method: 'post',
		data: data,
		headers: {
			version: 'dengfazhu',
		},
	});
}
